import '@unocss/reset/tailwind.css'
import 'virtual:uno.css'
import '@/assets/themes.css'

import { createApp } from 'vue'
import App from './App.vue'
import { useLocalStorage } from '@vueuse/core'
import Router from './router/index';
import { createPinia } from 'pinia'

import { createI18n } from 'vue-i18n'
import en from './langurage/en'
import zh from './langurage/zh'

const locale = useLocalStorage('language', 'en')

const i18n = createI18n({
  legacy: false,  // 设置为 false，启用 composition API 模式
  messages: {
    en, zh
  },
  locale: locale.value  //: 'en' 设置默认语言
})

const pinia = createPinia()

createApp(App).use(pinia).use(i18n).use(Router).mount('#app')
